<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>SASAPI</title><script src="../../../quicknav.js" type="text/javascript"></script><script><!--
document.quicknavBasePath="../../../index-files";
//--></script><link href="../../../style.css" title="JavaDoc" rel="stylesheet" type="text/css"/><link href="../../../unnatural.css" title="Unnatural" rel="alternate stylesheet" type="text/css"/><link href="../../../overview-summary.html" title="Overview" rel="top"/><meta name="generator" content="http://www.badgers-in-foil.co.uk/projects/as2api/"/></head><body><pre><span class="lineno" id="1">     1  </span><span class="comment doc">/**
<span class="lineno" id="2">     2  </span> * com.sekati.data.FLV
<span class="lineno" id="3">     3  </span> * @version 1.2.0
<span class="lineno" id="4">     4  </span> * @author jason m horwitz | sekati.com
<span class="lineno" id="5">     5  </span> * Copyright (C) 2007  jason m horwitz, Sekat LLC. All Rights Reserved.
<span class="lineno" id="6">     6  </span> * Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
<span class="lineno" id="7">     7  </span> */</span>
<span class="lineno" id="8">     8  </span>
<span class="lineno" id="9">     9  </span><span class="key">import</span> com.sekati.core.App;
<span class="lineno" id="10">    10  </span><span class="key">import</span> com.sekati.core.CoreObject;
<span class="lineno" id="11">    11  </span><span class="key">import</span> com.sekati.events.FramePulse;
<span class="lineno" id="12">    12  </span><span class="key">import</span> com.sekati.utils.Delegate;
<span class="lineno" id="13">    13  </span>
<span class="lineno" id="14">    14  </span><span class="comment doc">/**
<span class="lineno" id="15">    15  </span> * FLV class to be used with {@link com.sekati.ui.FLVPlayer}
<span class="lineno" id="16">    16  </span> */</span>
<span class="lineno" id="17">    17  </span><span class="key">class</span> com.sekati.data.FLV <span class="key">extends</span> CoreObject {
<span class="lineno" id="18">    18  </span>
<span class="lineno" id="19">    19  </span>	<span class="key">private</span> <span class="key">var</span> _this:FLV;
<span class="lineno" id="20">    20  </span>	<span class="key">private</span> <span class="key">var</span> _ns:NetStream;
<span class="lineno" id="21">    21  </span>	<span class="key">private</span> <span class="key">var</span> _nc:NetConnection;
<span class="lineno" id="22">    22  </span>	<span class="key">private</span> <span class="key">var</span> _video:Video;
<span class="lineno" id="23">    23  </span>	<span class="key">private</span> <span class="key">var</span> _videoURL:String;
<span class="lineno" id="24">    24  </span>	<span class="key">private</span> <span class="key">var</span> _audio:Sound;
<span class="lineno" id="25">    25  </span>	<span class="key">private</span> <span class="key">var</span> _audioContainer:MovieClip;
<span class="lineno" id="26">    26  </span>	<span class="key">private</span> <span class="key">var</span> _paused:Boolean;
<span class="lineno" id="27">    27  </span>	<span class="key">private</span> <span class="key">var</span> _started:Boolean;
<span class="lineno" id="28">    28  </span>	<span class="key">private</span> <span class="key">var</span> _duration:Number;
<span class="lineno" id="29">    29  </span>	<span class="key">private</span> <span class="key">var</span> _metadata:Object;
<span class="lineno" id="30">    30  </span>	<span class="key">private</span> <span class="key">var</span> _lastSeekableTime:Number;
<span class="lineno" id="31">    31  </span>
<span class="lineno" id="32">    32  </span>	<span class="comment">//event stubs</span>
<span class="lineno" id="33">    33  </span>	<span class="key">public</span> <span class="key">function</span> onProgress():Void {
<span class="lineno" id="34">    34  </span>	}
<span class="lineno" id="35">    35  </span>
<span class="lineno" id="36">    36  </span>	<span class="key">public</span> <span class="key">function</span> onEvent():Void {
<span class="lineno" id="37">    37  </span>	}
<span class="lineno" id="38">    38  </span>
<span class="lineno" id="39">    39  </span>	<span class="comment">//constructor</span>
<span class="lineno" id="40">    40  </span>	<span class="key">public</span> <span class="key">function</span> FLV() {
<span class="lineno" id="41">    41  </span>		<span class="key">super</span>( );
<span class="lineno" id="42">    42  </span>		_this = <span class="key">this</span>;
<span class="lineno" id="43">    43  </span>		_paused = <span class="key">false</span>;
<span class="lineno" id="44">    44  </span>		_started = <span class="key">false</span>;
<span class="lineno" id="45">    45  </span>		<span class="comment">// fix for bufferPreloader flakiness</span>
<span class="lineno" id="46">    46  </span>		_duration = <span class="num_const">1000000000</span>;
<span class="lineno" id="47">    47  </span>	}
<span class="lineno" id="48">    48  </span>
<span class="lineno" id="49">    49  </span>	<span class="comment doc">/**
<span class="lineno" id="50">    50  </span>	 * load video and begin playback
<span class="lineno" id="51">    51  </span>	 * @param url (String) flv url
<span class="lineno" id="52">    52  </span>	 * @param videoInstance (Video)
<span class="lineno" id="53">    53  </span>	 * @param width (Number) video width
<span class="lineno" id="54">    54  </span>	 * @param height (Number) video height
<span class="lineno" id="55">    55  </span>	 * @param audioContainer (MovieClip) audio becon holder
<span class="lineno" id="56">    56  </span>	 * @return Void
<span class="lineno" id="57">    57  </span>	 */</span>
<span class="lineno" id="58">    58  </span>	<span class="key">public</span> <span class="key">function</span> load(url:String, videoInstance:Video, width:Number, height:Number, audioContainer:MovieClip):Void {
<span class="lineno" id="59">    59  </span>		_videoURL = url;
<span class="lineno" id="60">    60  </span>		_video = videoInstance;
<span class="lineno" id="61">    61  </span>		_audioContainer = audioContainer;
<span class="lineno" id="62">    62  </span>		<span class="comment">//netconnection &amp; netstream</span>
<span class="lineno" id="63">    63  </span>		_nc = <span class="key">new</span> NetConnection( );
<span class="lineno" id="64">    64  </span>		_nc.connect( <span class="key">null</span> );
<span class="lineno" id="65">    65  </span>		_ns = <span class="key">new</span> NetStream( _nc );
<span class="lineno" id="66">    66  </span>		<span class="comment">//detach audio</span>
<span class="lineno" id="67">    67  </span>		audioContainer.attachAudio( _ns );
<span class="lineno" id="68">    68  </span>		_audio = <span class="key">new</span> Sound( audioContainer );
<span class="lineno" id="69">    69  </span>		<span class="comment">//init video</span>
<span class="lineno" id="70">    70  </span>		_video._width = width;
<span class="lineno" id="71">    71  </span>		_video._height = height;
<span class="lineno" id="72">    72  </span>		<span class="comment">//_video.smoothing = true;</span>
<span class="lineno" id="73">    73  </span>		_video.attachVideo( _ns );
<span class="lineno" id="74">    74  </span>		<span class="comment">//define buffer settings - higher will make loops and seeks VERY choppy, but play smoother: default is 0.1, good avg is 4</span>
<span class="lineno" id="75">    75  </span>		<span class="key">var</span> buffer:Number = (!App.FLV_BUFFER_TIME) ? <span class="num_const">4</span> : App.FLV_BUFFER_TIME;
<span class="lineno" id="76">    76  </span>		<span class="comment">//trace ("App.BUFFER_TIME: " + App.BUFFER_TIME);</span>
<span class="lineno" id="77">    77  </span>		_ns.setBufferTime( buffer );
<span class="lineno" id="78">    78  </span>		<span class="comment">//define NetStream &amp; NetConnection events triggers</span>
<span class="lineno" id="79">    79  </span>		_ns.onMetaData = Delegate.create( _this, ns_onMetaData );
<span class="lineno" id="80">    80  </span>		_ns.onStatus = Delegate.create( _this, ns_onStatus );
<span class="lineno" id="81">    81  </span>		_nc.onResult = Delegate.create( _this, nc_onResult );
<span class="lineno" id="82">    82  </span>		_nc.onStatus = Delegate.create( _this, nc_onStatus );
<span class="lineno" id="83">    83  </span>		<span class="comment">//start to load movie, pause and put on first frame to see something</span>
<span class="lineno" id="84">    84  </span>		playVideo( );
<span class="lineno" id="85">    85  </span>		stopVideo( );
<span class="lineno" id="86">    86  </span>		<span class="comment">//init onEnterFrame beacon (this should be a beacon &amp; should clean after itself)</span>
<span class="lineno" id="87">    87  </span>		<span class="comment">//audioContainer.onEnterFrame = Delegate.create (_this, _onEnterFrame);</span>
<span class="lineno" id="88">    88  </span>		FramePulse.getInstance( ).addFrameListener( _this );
<span class="lineno" id="89">    89  </span>	}
<span class="lineno" id="90">    90  </span>
<span class="lineno" id="91">    91  </span>	<span class="comment">//==========================================================</span>
<span class="lineno" id="92">    92  </span>	<span class="comment">//beacon &amp; cleanup</span>
<span class="lineno" id="93">    93  </span>	<span class="key">private</span> <span class="key">function</span> _onEnterFrame():Void {
<span class="lineno" id="94">    94  </span>		<span class="comment">//onProgress should be a generic update that gives preloadPercent, bufferPercent, currentTime</span>
<span class="lineno" id="95">    95  </span>		<span class="comment">//so that the same event can update the scroller, preloader and time indicator		</span>
<span class="lineno" id="96">    96  </span>		onProgress( getPercent( ), getPercentTimePlayed( ) );
<span class="lineno" id="97">    97  </span>	}
<span class="lineno" id="98">    98  </span>
<span class="lineno" id="99">    99  </span>	<span class="key">public</span> <span class="key">function</span> clean(scope:MovieClip, obj:String):Void {
<span class="lineno" id="100">   100  </span>		<span class="comment">//deconstructor that will clean the beacon and then remove the instance</span>
<span class="lineno" id="101">   101  </span>		<span class="key">delete</span> _audioContainer.onEnterFrame;
<span class="lineno" id="102">   102  </span>		_audioContainer.onEnterFrame = <span class="key">null</span>;
<span class="lineno" id="103">   103  </span>		<span class="key">delete</span> scope[obj];
<span class="lineno" id="104">   104  </span>	}
<span class="lineno" id="105">   105  </span>
<span class="lineno" id="106">   106  </span>	<span class="comment">//===========================================================</span>
<span class="lineno" id="107">   107  </span>	<span class="comment">// Basic controls</span>
<span class="lineno" id="108">   108  </span>	<span class="key">public</span> <span class="key">function</span> playVideo():Void {
<span class="lineno" id="109">   109  </span>		_started = <span class="key">true</span>;
<span class="lineno" id="110">   110  </span>		_ns.play( _videoURL );
<span class="lineno" id="111">   111  </span>	}
<span class="lineno" id="112">   112  </span>
<span class="lineno" id="113">   113  </span>	<span class="key">public</span> <span class="key">function</span> stopVideo():Void {
<span class="lineno" id="114">   114  </span>		_ns.pause( <span class="key">true</span> );
<span class="lineno" id="115">   115  </span>		<span class="comment">// dunno why this was here: maybe important?</span>
<span class="lineno" id="116">   116  </span>		<span class="comment">//seek (0);</span>
<span class="lineno" id="117">   117  </span>		_started = <span class="key">false</span>;
<span class="lineno" id="118">   118  </span>		_paused = <span class="key">false</span>;
<span class="lineno" id="119">   119  </span>	}
<span class="lineno" id="120">   120  </span>
<span class="lineno" id="121">   121  </span>	<span class="key">public</span> <span class="key">function</span> pause():Void {
<span class="lineno" id="122">   122  </span>		<span class="key">if</span> (!_paused &amp;&amp; _started) {
<span class="lineno" id="123">   123  </span>			_paused = <span class="key">true</span>;
<span class="lineno" id="124">   124  </span>			_ns.pause( <span class="key">true</span> );
<span class="lineno" id="125">   125  </span>		}
<span class="lineno" id="126">   126  </span>	}
<span class="lineno" id="127">   127  </span>
<span class="lineno" id="128">   128  </span>	<span class="key">public</span> <span class="key">function</span> resume():Void {
<span class="lineno" id="129">   129  </span>		<span class="key">if</span> (_paused &amp;&amp; _started) {
<span class="lineno" id="130">   130  </span>			_paused = <span class="key">false</span>;
<span class="lineno" id="131">   131  </span>			_ns.pause( <span class="key">false</span> );
<span class="lineno" id="132">   132  </span>		}
<span class="lineno" id="133">   133  </span>	}
<span class="lineno" id="134">   134  </span>
<span class="lineno" id="135">   135  </span>	<span class="key">public</span> <span class="key">function</span> pauseResume():Void {
<span class="lineno" id="136">   136  </span>		<span class="key">if</span>(_paused) {
<span class="lineno" id="137">   137  </span>			resume( );
<span class="lineno" id="138">   138  </span>		} <span class="key">else</span> {
<span class="lineno" id="139">   139  </span>			pause( );
<span class="lineno" id="140">   140  </span>		}
<span class="lineno" id="141">   141  </span>	}
<span class="lineno" id="142">   142  </span>
<span class="lineno" id="143">   143  </span>	<span class="key">public</span> <span class="key">function</span> setVolume(val:Number):Void {
<span class="lineno" id="144">   144  </span>		_audio.setVolume( val );
<span class="lineno" id="145">   145  </span>	}
<span class="lineno" id="146">   146  </span>
<span class="lineno" id="147">   147  </span>	<span class="comment">//=======================================</span>
<span class="lineno" id="148">   148  </span>	<span class="comment">//seek stuff</span>
<span class="lineno" id="149">   149  </span>	<span class="key">public</span> <span class="key">function</span> seek(time:Number):Void {
<span class="lineno" id="150">   150  </span>		_ns.seek( resolveTime( time ) );
<span class="lineno" id="151">   151  </span>	}
<span class="lineno" id="152">   152  </span>
<span class="lineno" id="153">   153  </span>	<span class="key">public</span> <span class="key">function</span> seekToPercent(percent:Number):Void {
<span class="lineno" id="154">   154  </span>		seek( _duration * percent / <span class="num_const">100</span> );
<span class="lineno" id="155">   155  </span>	}
<span class="lineno" id="156">   156  </span>
<span class="lineno" id="157">   157  </span>	<span class="key">public</span> <span class="key">function</span> ff():Void {
<span class="lineno" id="158">   158  </span>		<span class="comment">//optional step size as param</span>
<span class="lineno" id="159">   159  </span>		seek( getTime( ) + <span class="num_const">2</span> );
<span class="lineno" id="160">   160  </span>	}
<span class="lineno" id="161">   161  </span>
<span class="lineno" id="162">   162  </span>	<span class="key">public</span> <span class="key">function</span> rew():Void {
<span class="lineno" id="163">   163  </span>		<span class="comment">//optional step size as param</span>
<span class="lineno" id="164">   164  </span>		seek( getTime( ) - <span class="num_const">2</span> );
<span class="lineno" id="165">   165  </span>	}
<span class="lineno" id="166">   166  </span>
<span class="lineno" id="167">   167  </span>	<span class="key">private</span> <span class="key">function</span> resolveTime(time:Number):Number {
<span class="lineno" id="168">   168  </span>		<span class="comment">//formats time so that it fits inside the available seek scope</span>
<span class="lineno" id="169">   169  </span>		<span class="key">var</span> maxTime:Number = (_lastSeekableTime != <span class="key">null</span>) ? _lastSeekableTime : _duration;
<span class="lineno" id="170">   170  </span>		<span class="key">return</span> Math.max( Math.min( time, maxTime ), <span class="num_const">0</span> );
<span class="lineno" id="171">   171  </span>	}
<span class="lineno" id="172">   172  </span>
<span class="lineno" id="173">   173  </span>	<span class="comment">//=======================================</span>
<span class="lineno" id="174">   174  </span>	<span class="comment">//status tools</span>
<span class="lineno" id="175">   175  </span>	<span class="key">public</span> <span class="key">function</span> isPaused():Boolean {
<span class="lineno" id="176">   176  </span>		<span class="key">return</span> _paused;
<span class="lineno" id="177">   177  </span>	}
<span class="lineno" id="178">   178  </span>
<span class="lineno" id="179">   179  </span>	<span class="key">public</span> <span class="key">function</span> isPlaying():Boolean {
<span class="lineno" id="180">   180  </span>		<span class="key">return</span> _started;
<span class="lineno" id="181">   181  </span>	}
<span class="lineno" id="182">   182  </span>
<span class="lineno" id="183">   183  </span>	<span class="key">public</span> <span class="key">function</span> isStopped():Boolean {
<span class="lineno" id="184">   184  </span>		<span class="key">return</span> !_started;
<span class="lineno" id="185">   185  </span>	}
<span class="lineno" id="186">   186  </span>
<span class="lineno" id="187">   187  </span>	<span class="key">public</span> <span class="key">function</span> getTime():Number {
<span class="lineno" id="188">   188  </span>		<span class="key">return</span> _ns.time;
<span class="lineno" id="189">   189  </span>	}
<span class="lineno" id="190">   190  </span>
<span class="lineno" id="191">   191  </span>	<span class="key">public</span> <span class="key">function</span> getTotalTime():Number {
<span class="lineno" id="192">   192  </span>		<span class="key">return</span> _duration;
<span class="lineno" id="193">   193  </span>	}
<span class="lineno" id="194">   194  </span>
<span class="lineno" id="195">   195  </span>	<span class="key">public</span> <span class="key">function</span> getPercentTimePlayed():Number {
<span class="lineno" id="196">   196  </span>		<span class="key">return</span> getTime( ) * <span class="num_const">100</span> / _duration;
<span class="lineno" id="197">   197  </span>	}
<span class="lineno" id="198">   198  </span>
<span class="lineno" id="199">   199  </span>	<span class="comment">//========================================</span>
<span class="lineno" id="200">   200  </span>	<span class="comment">//preload status tools</span>
<span class="lineno" id="201">   201  </span>	<span class="key">public</span> <span class="key">function</span> getPercent():Number {
<span class="lineno" id="202">   202  </span>		<span class="key">return</span> Math.round( _ns.bytesLoaded / _ns.bytesTotal * <span class="num_const">100</span> );
<span class="lineno" id="203">   203  </span>	}
<span class="lineno" id="204">   204  </span>
<span class="lineno" id="205">   205  </span>	<span class="key">public</span> <span class="key">function</span> getBufferPercent():Number {
<span class="lineno" id="206">   206  </span>		<span class="key">var</span> total:Number = Math.min( _duration, _ns.bufferTime );
<span class="lineno" id="207">   207  </span>		<span class="key">return</span> Math.min( Math.round( _ns.bufferLength / total * <span class="num_const">100</span> ), <span class="num_const">100</span> );
<span class="lineno" id="208">   208  </span>	}
<span class="lineno" id="209">   209  </span>
<span class="lineno" id="210">   210  </span>	<span class="comment">//=======================================</span>
<span class="lineno" id="211">   211  </span>	<span class="comment">//Netstream &amp; Netconnection events</span>
<span class="lineno" id="212">   212  </span>	<span class="key">private</span> <span class="key">function</span> nc_onResult(info:Object):Void {
<span class="lineno" id="213">   213  </span>		trace( <span class="str_const">"unknown ncOnResult: "</span> + info.code );
<span class="lineno" id="214">   214  </span>	}
<span class="lineno" id="215">   215  </span>
<span class="lineno" id="216">   216  </span>	<span class="key">private</span> <span class="key">function</span> nc_onStatus(info:Object):Void {
<span class="lineno" id="217">   217  </span>		trace( <span class="str_const">"unknown ncOnStatus: "</span> + info.code );
<span class="lineno" id="218">   218  </span>	}
<span class="lineno" id="219">   219  </span>
<span class="lineno" id="220">   220  </span>	<span class="key">private</span> <span class="key">function</span> ns_onStatus(info:Object):Void {
<span class="lineno" id="221">   221  </span>		<span class="key">switch</span> (info.code) {
<span class="lineno" id="222">   222  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Buffer.Empty"</span> :
<span class="lineno" id="223">   223  </span>				onEvent( <span class="str_const">"bufferEmpty"</span> );
<span class="lineno" id="224">   224  </span>				<span class="key">break</span>;
<span class="lineno" id="225">   225  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Buffer.Full"</span> :
<span class="lineno" id="226">   226  </span>				onEvent( <span class="str_const">"bufferFull"</span> );
<span class="lineno" id="227">   227  </span>				<span class="key">break</span>;
<span class="lineno" id="228">   228  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Buffer.Flush"</span> :
<span class="lineno" id="229">   229  </span>				onEvent( <span class="str_const">"bufferFlush"</span> );
<span class="lineno" id="230">   230  </span>				<span class="key">break</span>;
<span class="lineno" id="231">   231  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Play.Start"</span> :
<span class="lineno" id="232">   232  </span>				onEvent( <span class="str_const">"start"</span> );
<span class="lineno" id="233">   233  </span>				<span class="key">break</span>;
<span class="lineno" id="234">   234  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Play.Stop"</span> :
<span class="lineno" id="235">   235  </span>				onEvent( <span class="str_const">"stop"</span> );
<span class="lineno" id="236">   236  </span>				<span class="key">break</span>;
<span class="lineno" id="237">   237  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Play.StreamNotFound"</span> :
<span class="lineno" id="238">   238  </span>				onEvent( <span class="str_const">"play_streamNotFound"</span> );
<span class="lineno" id="239">   239  </span>				<span class="key">break</span>;
<span class="lineno" id="240">   240  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Seek.InvalidTime"</span> :
<span class="lineno" id="241">   241  </span>				onEvent( <span class="str_const">"seek_InvalidTime"</span> );
<span class="lineno" id="242">   242  </span>				<span class="key">break</span>;
<span class="lineno" id="243">   243  </span>			<span class="key">case</span> <span class="str_const">"NetStream.Seek.Notify"</span> :
<span class="lineno" id="244">   244  </span>				onEvent( <span class="str_const">"seek_notify"</span> );
<span class="lineno" id="245">   245  </span>				<span class="key">break</span>;
<span class="lineno" id="246">   246  </span>			<span class="key">default</span> :
<span class="lineno" id="247">   247  </span>				trace( <span class="str_const">"unrecognized onStatus value: "</span> + info.code );
<span class="lineno" id="248">   248  </span>		}
<span class="lineno" id="249">   249  </span>	}
<span class="lineno" id="250">   250  </span>
<span class="lineno" id="251">   251  </span>	<span class="key">private</span> <span class="key">function</span> ns_onMetaData(metadata:Object):Void {
<span class="lineno" id="252">   252  </span>		_duration = metadata.duration;
<span class="lineno" id="253">   253  </span>		_lastSeekableTime = metadata.lastkeyframetimestamp;
<span class="lineno" id="254">   254  </span>		_metadata = metadata;
<span class="lineno" id="255">   255  </span>		<span class="comment">//depends on which application was used to encode the FLV file</span>
<span class="lineno" id="256">   256  </span>		<span class="comment">//trace("nsOnMetaData event at " + _ns.time);</span>
<span class="lineno" id="257">   257  </span>		<span class="comment">/*
<span class="lineno" id="258">   258  </span>		SORENSON - INITIAL META:
<span class="lineno" id="259">   259  </span>		creationdate - Mon Jun 12 16:21:12 2006 
<span class="lineno" id="260">   260  </span>		framerate - 29.9699859619141
<span class="lineno" id="261">   261  </span>		audiocodecid - 2
<span class="lineno" id="262">   262  </span>		audiodatarate - 64
<span class="lineno" id="263">   263  </span>		videocodecid - 5
<span class="lineno" id="264">   264  </span>		canSeekToEnd - false
<span class="lineno" id="265">   265  </span>		videodatarate - 600
<span class="lineno" id="266">   266  </span>		height - 358
<span class="lineno" id="267">   267  </span>		width - 150
<span class="lineno" id="268">   268  </span>		duration - 17.65
<span class="lineno" id="269">   269  </span>		*/</span>
<span class="lineno" id="270">   270  </span>		<span class="comment">//find what metadata is available now</span>
<span class="lineno" id="271">   271  </span>		<span class="comment">/*
<span class="lineno" id="272">   272  </span>		for (var i in metadata) {
<span class="lineno" id="273">   273  </span>			trace (i + " - " + metadata[i]);
<span class="lineno" id="274">   274  </span>		}
<span class="lineno" id="275">   275  </span>		//trace cuepoints
<span class="lineno" id="276">   276  </span>		for (var i in metadata.cuePoints) {
<span class="lineno" id="277">   277  </span>			trace ("CUEPOINTS: " + i + " - " + metadata.cuePoints[i]);
<span class="lineno" id="278">   278  </span>			for (var y in metadata.cuePoints[i]) {
<span class="lineno" id="279">   279  </span>				trace ("  CUEPOINTS: " + y + " - " + metadata.cuePoints[i][y]);
<span class="lineno" id="280">   280  </span>			}
<span class="lineno" id="281">   281  </span>		}
<span class="lineno" id="282">   282  </span>		*/</span>
<span class="lineno" id="283">   283  </span>	}
<span class="lineno" id="284">   284  </span>
<span class="lineno" id="285">   285  </span>	<span class="comment doc">/**
<span class="lineno" id="286">   286  </span>	 * calls superclasses destroy and executes its own destroy behaviors.
<span class="lineno" id="287">   287  </span>	 * @return Void
<span class="lineno" id="288">   288  </span>	 */</span>
<span class="lineno" id="289">   289  </span>	<span class="key">public</span> <span class="key">function</span> destroy():Void {
<span class="lineno" id="290">   290  </span>		FramePulse.getInstance( ).removeFrameListener( _this );
<span class="lineno" id="291">   291  </span>		<span class="key">super</span>.destroy( );
<span class="lineno" id="292">   292  </span>	}
<span class="lineno" id="293">   293  </span>}</pre><ul class="main_nav" id="main_nav"><li><a href="../../../overview-summary.html" title="Overview of SASAPI" class="button">Overview</a></li><li><a href="package-summary.html" title="Overview of package com.sekati.data" class="button">Package</a></li><li><a href="FLV.html" title="Detail of com.sekati.data.FLV API" class="button">Class</a></li><li><span class="button nav_current">Source</span></li><li><a href="../../../index-files/index.html" title="Alpabetical index of types and members" class="button">Index</a></li></ul><div class="footer"><a href="http://www.badgers-in-foil.co.uk/projects/as2api/" title="ActionScript 2 API Documentation Generator">as2api</a></div></body></html>